﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PreMixZone
{
    class Function
    {
        public String findSLMPart(String data)
        {
            try
            {
                String slm = data.Substring(0, 7);
                if (data.Length == 15)
                {
                    return slm + "2B";
                }
                else if (data.Length == 12)
                {
                    return slm;
                }
            }
            catch
            {
                //
            }
            return "error";
        }

        public bool SearchString(String a, String b)
        {
            return a.Contains(b);
        }

        public String dataTime()
        {
            DateTime now = DateTime.Now;
            return now.ToString("yyyy/MM/dd HH:mm:ss");
        }
    }
}
